<?php
require_once LIBRARY_PATH . '/FinalView/Bootstrap.php';

class Bootstrap extends FinalView_Bootstrap
{
    
    
    /**
    * Init routes
    * 
    */
    protected function _initRouter() 
    {
        $main = new Zend_Config_Xml(APPLICATION_PATH . '/routes/main.xml');
        $this->_addRoutes($main->routes->toArray());
        
        $products_db = new Zend_Config_Xml(APPLICATION_PATH . '/routes/products-db.xml');
        $this->_addRoutes($products_db->routes->toArray());
    }
    
    /**
    * Init navigation
    * 
    */
    protected function _initNavigation()
    {
        // bootstrap view
        $this->bootstrap('view');
        $view = $this->getResource('view');
        
        $main = new Zend_Config_Xml(APPLICATION_PATH . '/navigation/main.xml');
        
        // assign navigation
        $view->navigation = array
        (
            'main' => new Zend_Navigation($main->pages->toArray()), 
        );
    }
    
}